home *** CD-ROM | disk | FTP | other *** search
/ Transactor / Transactor_20_1987_Transactor_Publishing.d64 / un auto-run (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  1KB  |  51 lines

  1. 10 rem * this program changes auto-run
  2. 20 rem * programs back to their
  3. 30 rem * original basic format
  4. 40 rem * written by doug resenbeck 10/86
  5. 50 printchr$(147)chr$(17)chr$(17)
  6. 60 print"  name of basic auto-run program"
  7. 70 print:inputar$:t=len(ar$)
  8. 80 gosub440
  9. 90 ifs=1thens=0:goto50
  10. 100 printchr$(147)chr$(17)chr$(17)
  11. 110 print"  new name with auto-run removed"
  12. 120 print:inputua$:t=len(ua$)
  13. 130 gosub440
  14. 140 ifs=1thens=0:goto100
  15. 150 printchr$(147)chr$(17)"auto-run     "ar$
  16. 160 printchr$(17)"to"
  17. 170 printchr$(17)"un/auto-run  "ua$
  18. 180 printchr$(17)"please wait"
  19. 190 open2,8,2,ar$+",p,r"
  20. 220 open8,8,8,ua$+",p,w"
  21. 250 get#2,a$,b$
  22. 260 ifa$=""thena$=chr$(0)
  23. 270 a=asc(a$)
  24. 280 ifb$=""thenb$=chr$(0)
  25. 290 b=asc(b$):c=a+256*b:d=2049-c
  26. 300 ifd>0then320
  27. 310 printchr$(147)chr$(17)"program is not a basic auto-run program":goto380
  28. 320 forx=1tod:get#2,a$:next
  29. 330 print#8,chr$(1);
  30. 340 print#8,chr$(8);
  31. 350 get#2,a$:sw=st:ifa$=""thena$=chr$(0)
  32. 360 print#8,a$;:ifsw=0then350
  33. 370 printchr$(147)chr$(17)"done"
  34. 380 close2:close8
  35. 390 gosub480
  36. 400 ife>0then500
  37. 410 printchr$(17):input"more";n$
  38. 420 ifn$="y"then50
  39. 430 end
  40. 440 ift<17thenreturn
  41. 450 printchr$(17):print"filename too long"
  42. 460 forx=1to1500:next:s=1
  43. 470 return
  44. 480 close15:open15,8,15
  45. 490 input#15,e,e$,tr,s:close15:return
  46. 500 print"disk error #";e
  47. 510 printe$
  48. 520 print"track";tr
  49. 530 print"sector";s
  50. 540 close2:close8
  51.